package com.itheima.apis.ai;

import com.itheima.model.common.dtos.ResponseResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import java.util.Map;

@Slf4j
@Component
public class IAiClientFallback implements IAiClient {
    
    @Override
    public ResponseResult<?> sendMessage(Map<String, Object> request) {
        log.error("AI服务降级：发送消息失败");
        return ResponseResult.errorResult(500, "AI服务暂时不可用");
    }
    
    @Override
    public ResponseResult<?> getHistory(String sessionId, Long userId) {
        log.error("AI服务降级：获取历史失败");
        return ResponseResult.errorResult(500, "AI服务暂时不可用");
    }
    
    @Override
    public ResponseResult<?> clearSession(String sessionId, Long userId) {
        log.error("AI服务降级：清除会话失败");
        return ResponseResult.errorResult(500, "AI服务暂时不可用");
    }
    
    @Override
    public ResponseResult<?> getSessions(Long userId) {
        log.error("AI服务降级：获取会话列表失败");
        return ResponseResult.errorResult(500, "AI服务暂时不可用");
    }
}

